<#include "${ftl_skin}/common/header.ftl">
</head>

<body class="gray-bg">
<!-- wrap --> 
<div class="wrapper wrapper-content animated fadeInRight"> 
<!--查询-->
<div class="ibox float-e-margins">
       <div class="ibox-title">
         <form id="bs-form" role="form" class="form-horizontal" method="post">
             <input type="hidden" name="field_id" id="field_id">
             <input type="hidden" id="field_name" name="field_name">
         	<div class="ibox-form">
                <!--第一行-->
                <div class="form-box clearfix">
                    <label class="col-sm-1 col-hf-9 control-label">操作表名：</label>
                    <div class="col-sm-2 col-hf-15">
                        <input id="record_table_name" name="record_table_name" class="form-control layer-date col-lg-6" placeholder="请输入操作表名" value="" type="text" >
                    </div>

                    <label class="col-sm-1 col-hf-9 control-label">操作人：</label>
                    <div class="col-sm-2 col-hf-15">
                        <div class="col-sm-10 col-hf-75">
                            <input id="record_man" name="record_man" value="" type="hidden">
                            <input id="record_man_name" name="record_man_name" class="form-control layer-date col-lg-6" placeholder="请选择操作人" value="" type="text" readonly>
                        </div>
                        <div class="ibox-tools">
                            <a href="javascript:void(0);" onClick="selectUser('record_man','record_man_name');return false;"><i
                                    class="fa fa-search"></i></a>
                            <a href="javascript:void(0);" onClick="val_del('record_man','record_man_name');"><i class="fa fa-trash"></i></a>
                        </div>
                    </div>

                    <label class="col-sm-1 col-hf-9 control-label">操作类型：</label>
                    <div class="col-sm-2 col-hf-15">
                        <select titl="" class="form-control change valid" name="record_type" id="record_type" aria-invalid="false">
                            <option value="" selected="">全部</option>
                          <#list RecordType.getList() as p>
                          <option value="${p.key}">${p.value}</option>
                          </#list>
                        </select>
                    </div>
                </div>
                <!--end 第一行-->
                <div class="form-box clearfix">
                    <label class="col-sm-1 col-hf-9 control-label">操作时间：</label>
                    <div class="col-sm-2 col-hf-39">
                        <!--日历控件-->
                        <div class="col-sm-5 col-hf-46">
                            <div class="input-group date">
                                <input placeholder="点击选择日期" type="text" id="record_time_start" name="record_time_start" class="form-control query-params" onclick="laydate({elem: '#record_time_start'});" readonly="">
                                <span class="input-group-addon"><i class="fa fa-calendar" onclick="laydate({elem: '#record_time_start'});"></i></span>
                            </div>
                        </div>
                        <div class="col-sm-1 col-hf-5 bight-mlr">~</div>
                        <div class="col-sm-5 col-hf-46">
                            <div class="input-group date">
                                <input placeholder="点击选择日期" type="text" id="record_time_end" name="record_time_end" class="form-control query-params" onclick="laydate({elem: '#record_time_end'});" readonly="">
                                <span class="input-group-addon"><i class="fa fa-calendar" onclick="laydate({elem: '#record_time_end'});"></i></span>
                            </div>
                        </div>
                        <!--日历控件 end-->
                    </div>
                    <div class="ibox-right col-hf-6">
                        <button class="btn btn-primary m-t-none" type="button" onclick="searchBSTable('bs-table', 'bs-form');return false;">查询
                        </button>
                    </div>
                </div>

        </form>
      </div>
    </div>
<!--/查询-->

<!--列表-->
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">

                    <table 	id="bs-table"
                              data-url="${path.servicePath}record/list.do"
                              data-method="post"
                              data-response-handler="pagerTableResponseHandler"
                              data-pagination="true"
                              data-page-list="[10, 20, 50, 100]"

                              data-toolbar="#bs-toolbar"
                              data-resizable="false"

                              data-side-pagination="server"
                              data-content-type="application/x-www-form-urlencoded;charset=utf-8"

                              

                              data-classes="table table-hover table-condensed"
                              data-striped="true"
                              data-sort-order="desc"
                              data-sort-name="record_time"

                              data-query-params="setParams"
                    >
                        <thead>
                        <tr>
                                <th data-field="record_table_name" data-align="center" data-sortable="true">操作表名</th>
                            <th data-field="record_table_id" data-align="center" data-sortable="true">操作表id</th>
                            <th data-formatter="typeFormatter" data-field="record_type" data-align="center" data-sortable="true">操作类型</th>
                            <th data-field="record_man_name" data-align="center" data-sortable="true">操作人</th>
                            <th data-field="record_time" data-align="center" data-sortable="true">操作时间</th>
                        </tr>
                        </thead>
                    </table>


                    <!-- end ibox-content -->
                </div>
            </div>
        </div>
    </div>

</div>
<!-- end wrap --> 
<#include "${ftl_skin}/common/js.ftl">
<#include "${ftl_skin}/common/js_openDialog.ftl">
<script>
    $(function(){
        //初始化表单验证
        initHFForm('#bs-form');
        initBSTable('bs-table', {});
    });
    function typeFormatter(value, row, index) {
        <#list RecordType.getList() as p>
            if(value == '${p.key}')
                return '${p.value}';
        </#list>
        return '--';
    }
</script>
<#include "${ftl_skin}/common/footer.ftl">
